package com.xiaoxing.zhinenghuacangku_liaocheng.mvp.contract;

import com.jess.arms.mvp.IView;
import com.jess.arms.mvp.IModel;

import java.util.List;
import java.util.Map;

import com.xiaoxing.zhinenghuacangku_liaocheng.mvp.model.entity.GetDistributeList;
import com.xiaoxing.zhinenghuacangku_liaocheng.mvp.model.entity.GetUserSpaceListForAutoStore;
import com.xiaoxing.zhinenghuacangku_liaocheng.mvp.ui.entity.ZhiJianRuKu;

import io.reactivex.Observable;

public interface LiaoCheng_ZhiJianRuKuContract {
    //对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
    interface View extends IView {
        void getZhiJianRuKuDataSuccess(ZhiJianRuKu entityData);

        void getDistributeListSuccess(List<GetDistributeList> getDistributeLists);//搜索获取物料列表

        void getUserSpaceListForAutoStoreSuccess(List<GetUserSpaceListForAutoStore> getUserSpaceListForAutoStoreList);//获取空闲仓位

        void createMaterialForInstoreAutoSuccess(String createMaterialForInstoreAuto);//生成标签

        void setInstoreBufferReadyForAGVSuccess(String setInstoreBufferReadyForAGV);//入库 扫描入库缓冲位二维码

        void addAgvTaskSuccess(String addAgvTask);//入库操作

        void cancelBufferReadyForAGVSuccess(String addAgvTask);//设置缓冲位置为空,可以使用
    }

    //Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
    interface Model extends IModel {
        Observable<ZhiJianRuKu> getZhiJianRuKuData(Map<String, String> map);

        //搜索获取物料列表
        Observable<String> getDistributeList(
                String user_id,
                String orderNo,
                String projectName,
                String material,
                String projectNo,
                String sname
        );

        Observable<String> getUserSpaceListForAutoStore(
                String user_id,
                String spname
        );

        //        Observable<String> createMaterialForInstoreAuto(
//                RequestBody did,
//                RequestBody uid,
//                RequestBody num,
////                String imgStr
//                MultipartBody.Part imgStr
//        );
        Observable<String> createMaterialForInstoreAuto(
                Map<String, String> params
        );

        Observable<String> setInstoreBufferReadyForAGV(
                String bufferId,
                String spid
        );

        Observable<String> addAgvTask(
                String mid, String instoreBufferId, String spid, String num, String uid, String remark
        );

        Observable<String> cancelBufferReadyForAGV(
                String bufferId
        );
    }
}
